import { ref, reactive } from 'vue'

/**
 * @brief: 表格相关的hooks
 * @return {Object} 返回表格列配置、数据和选项
 */
export default function () {
  const tableColumns = ref([
    {
      label: '菜单名称(中文)',
      prop: 'menuName',
      slotable: true
    },
    {
      label: '菜单名称(English)',
      prop: 'name'
    },
    {
      label: '排序',
      prop: 'order',
      width: '80px'
    },
    {
      label: '图标',
      prop: 'icon',
      slotable: true,
      width: '80px'
    },
    {
      label: '组件地址',
      prop: 'component',
      width: "260px"
    },
    {
      label: '路由地址',
      prop: 'path',
      width: "200px"
    },
    {
      label: '状态',
      prop: 'statusDetail',
      width: '100px',
      slotable: true
    },
    {
      label: '创建时间',
      prop: 'createdAt',
      isTime: true
    }
  ])
  const tableData = ref([])
  const tableOptions = ref({
    showOrder: false
  })
  return {
    tableColumns, tableData, tableOptions
  }
}
